From 332eed5df0768fb4a9e5c4a4afa43a632f3539a4 Mon Sep 17 00:00:00 2001 From: Nick Jenkins Date: Wed, 8 Nov 2006 06:03:01 +0000 Subject: [PATCH] Fix parserTests regression introduced in r17479. Example of failing test: ---------------------- Running test Magic links: RFC (bug 479)... FAILED! --- /tmp/mwParser-1109840392-expected 2006-11-08 05:39:04.000000000 +0000 +++ /tmp/mwParser-1109840392-actual 2006-11-08 05:39:04.000000000 +0000 @@ -1,2 +1,2 @@ -

RFC 822 +

RFC 822

---------------------- Also applied to the "BUG 1887: A RFC with a thumbnail" and "RFC code coverage" tests. --- includes/Linker.php | 2 +- includes/Parser.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index bef2cd62b2..be482839d5 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -29,7 +29,7 @@ class Linker { * @todo document * @static */ - protected static function getExternalLinkAttributes( $link, $text, $class='' ) { + public static function getExternalLinkAttributes( $link, $text, $class='' ) { $link = htmlspecialchars( $link ); $r = ($class != '') ? " class=\"$class\"" : " class=\"external\""; diff --git a/includes/Parser.php b/includes/Parser.php index 0d881b5eeb..e83cbcc8bb 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1038,7 +1038,8 @@ class Parser } $url = wfMsg( $urlmsg, $id ); - $text = Linker::makeExternalLink( $url, "$keyword $id" ); + $la = Linker::getExternalLinkAttributes( $url, "$keyword $id" ); + $text = "{$keyword} {$id}"; } return $text; } -- 2.20.1